import config from '@/config'
import http from '@/utils/request'

export default {
  upload: {
    url: `${config.API_URL}/upload`,
    name: '文件上传',
    post: async function (data, config = {}) {
      return await http.post(this.url, data, config)
    }
  },
  uploadFile: {
    url: `${config.API_URL}/uploadFile`,
    name: '附件上传',
    post: async function (data, config = {}) {
      return await http.post(this.url, data, config)
    }
  },
  exportFile: {
    url: `${config.API_URL}/fileExport`,
    name: '导出附件',
    get: async function (data, config = {}) {
      return await http.get(this.url, data, config)
    }
  },
  importFile: {
    url: `${config.API_URL}/fileImport`,
    name: '导入附件',
    post: async function (data, config = {}) {
      return await http.post(this.url, data, config)
    }
  },
  file: {
    menu: {
      url: `${config.API_URL}/file/menu`,
      name: '获取文件分类',
      get: async function () {
        // return await http.get(this.url)

        return {
          code: 200,
          data: [
            {
              id: '',
              label: '未分组'
            },
            {
              id: '100',
              label: '素材'
            },
            {
              id: '200',
              label: '证件'
            }
          ],
          message: ''
        }
      }
    },
    list: {
      url: `${config.API_URL}/file/list`,
      name: '获取文件列表',
      get: async function (params) {
        //return await http.get(this.url, params)

        return {
          code: 200,
          data: {
            total: 85060,
            page: 1,
            pageSize: 20,
            rows: [
              {
                id: 'fbF4ccCe-3FC5-e515-CFA3-907d7Aa99156',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Patricia Allen&_=.png',
                fileName: 'EEC2274A-7fE1-FeEb-858B-Cea5d6a8Fd17.png'
              },
              {
                id: 'bd7AA762-EDaF-ACD2-bf9c-9eDD78BDC6e3',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Angela Harris&_=.png',
                fileName: 'Af0767db-E8bb-2E32-8BAb-1b97f90AEC3A.png'
              },
              {
                id: 'A7319DEE-0B4e-72BE-D4cB-eFffBE3AefcF',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Jason Williams&_=.png',
                fileName: '43D9bD7f-55A8-8852-d2Eb-D5B38AcC8688.png'
              },
              {
                id: '59CB0FeF-3fcF-04DC-AFcc-2fb7b0ABE8Cc',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Matthew Martinez&_=.png',
                fileName: 'cAADC3a3-9DDB-3Be4-bBde-6FE4bA8De9C6.png'
              },
              {
                id: '3465b1DF-BfA2-efAf-F3FC-4BD187bfBfeB',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Ronald Harris&_=.png',
                fileName: 'c7Ee4A6f-41a9-210e-05EC-b81DBcDb8AFe.png'
              },
              {
                id: 'B2ab501f-5966-b8FA-3bF4-4082D23d0EfB',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Karen Lopez&_=.png',
                fileName: 'af254Dfd-D990-85a5-FEb2-daCbdb93ed58.png'
              },
              {
                id: 'f4aABfbF-5ADA-5bAc-7dCB-D4D3DD9E3974',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Robert Hernandez&_=.png',
                fileName: 'Fbff717E-5c3c-16Cc-6CdE-C2169F9d127E.png'
              },
              {
                id: '99FE28A2-1FA2-eeA6-12dF-e5CfAF4A437A',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Robert Jackson&_=.png',
                fileName: 'C1aAee0F-89Dc-3EfE-27D3-502fa78fbb9f.png'
              },
              {
                id: 'e80996F5-b362-3f28-49c2-ef9eC623cFD2',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Gary Hernandez&_=.png',
                fileName: 'D5C8Edb4-B7b4-28Cf-f8A3-12e29eCCD56d.png'
              },
              {
                id: 'fbBE7B94-2E3A-1A92-0B5f-bd926f86AfA2',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Paul Lee&_=.png',
                fileName: 'FbA4d63b-F9Db-fb1e-f8Ea-FFe4ebbc884a.png'
              },
              {
                id: 'C6aFDBF3-156F-cf19-77DF-BAE54dD347c1',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Jason Wilson&_=.png',
                fileName: '1a450760-CcEE-DB6e-EA76-048D2ffa1fA9.png'
              },
              {
                id: '4AE7ACfA-2e0D-BFFb-FF78-8852AB1Efed2',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Timothy Perez&_=.png',
                fileName: 'a3083d79-fdCb-4dDd-b6E4-907Bc8FDDbFc.png'
              },
              {
                id: 'FebcfA5c-fcB4-c925-4a92-DdF0DE030f2D',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Elizabeth Thomas&_=.png',
                fileName: 'FbbFEFC0-fbeb-FdcF-2F4a-18c32855176f.png'
              },
              {
                id: 'EDeE1ea9-488b-fE4A-2bAE-8dcc924b54Df',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Steven Miller&_=.png',
                fileName: '69f5Cae0-EB3c-b228-947A-De597AbB699d.png'
              },
              {
                id: '7f5Dc7F1-deB5-AfdC-b6BE-Ec724F4E99f3',
                url: 'http://dummyimage.com/200x200/ddd/333&text=David Miller&_=.png',
                fileName: '5Abe3fE9-2CBe-3B27-FB17-F7865C8eC41c.png'
              },
              {
                id: '2E8BbfF7-e8d7-6CB3-AC82-D7CbA66eF358',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Frank Robinson&_=.png',
                fileName: 'Ab147B6E-3Aa1-2d9E-Ed32-2b8AfBaE843f.png'
              },
              {
                id: '27AB1131-FD3A-f662-4668-96f68EfECE82',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Timothy Robinson&_=.png',
                fileName: '372c48cb-4161-9A8a-fce8-fb1B5B449c08.png'
              },
              {
                id: 'b557716B-12d1-d5A1-1172-92c3952Bd9d4',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Steven Lewis&_=.png',
                fileName: '30FFd628-F5A4-9f47-4e3b-1AAa35A9b22e.png'
              },
              {
                id: 'AEb1E79F-2B88-DCBD-521C-8329eAAC4FbE',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Steven Brown&_=.png',
                fileName: '5823De35-DEA5-BCd3-679F-FA9fb14CF5FC.png'
              },
              {
                id: 'E2c47E09-6eD2-06A2-9fdD-FAE4Bf5b19E1',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Jennifer Taylor&_=.png',
                fileName: 'cf3a9CBe-17DA-b163-cCf1-E724f1c8d7be.png'
              },
              {
                id: 'bD98DcAB-B97f-4d7F-39CF-850d814db67f',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Robert Gonzalez&_=.png',
                fileName: '8cBeFf21-f17B-bb36-DbaE-AC5429f09f6e.png'
              },
              {
                id: '617D0eB4-9AB9-32E7-1772-2244363CCcCd',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Barbara Williams&_=.png',
                fileName: '47F2B08c-a6b9-6Ef1-42E3-67E2724Da569.png'
              },
              {
                id: '0afddFBB-2A9c-ac6f-a42E-69c8DeDe872C',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Sarah Hall&_=.png',
                fileName: 'A436Fc72-B8c2-cEd4-6d4a-5Ef1D4aa8FCF.png'
              },
              {
                id: 'FDc3bBF4-8CB5-f417-4BB1-A0f3AED64Feb',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Maria White&_=.png',
                fileName: '9144De1c-796C-EdB7-2A45-9c5Cc6a1927D.png'
              },
              {
                id: '6b112Ebf-3e9B-7FEf-12A7-4993EFcFAf95',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Brenda Moore&_=.png',
                fileName: '54FD5C8d-5BD6-ce4E-DfD9-11cCCd1DdcAD.png'
              },
              {
                id: '1e268Ce1-9cab-88AF-cDeb-bdDF82ae633E',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Kenneth Lewis&_=.png',
                fileName: '04079B0A-feEc-e1DC-eeef-ddAAbfFADd26.png'
              },
              {
                id: 'DA924E49-CcDB-A579-05Ab-33FE8fFeb316',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Nancy Miller&_=.png',
                fileName: 'E4fFCD1D-C3EF-1C3E-Dd5f-9caFA83BF22C.png'
              },
              {
                id: 'cA7cFf6C-4Ed4-26be-32f1-B98F2d2F6d8D',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Kimberly Martin&_=.png',
                fileName: '1DfA3D2f-c2Cb-c741-dB8d-B7D31E3AFF69.png'
              },
              {
                id: 'd774fce4-4ABb-CAEc-cc84-B3dfd3eEcfeA',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Betty Clark&_=.png',
                fileName: 'a8b79F2A-1FA8-faeB-FD5a-9bA10a5bcC0D.png'
              },
              {
                id: 'ebdbA17D-fCDc-5fA9-dCed-91b1cBff984C',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Michael Miller&_=.png',
                fileName: 'B9FfD4BB-dcE9-ef63-f5fC-Dc5C1DDD3233.png'
              },
              {
                id: 'F5c53E2a-e793-1065-7dFB-64Fad85ffDd8',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Karen Taylor&_=.png',
                fileName: 'df28cAfc-671A-fCc0-8ec6-537139E3AAa7.png'
              },
              {
                id: '51A59F6c-4Ee3-08C5-e166-E3DD9402AF2D',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Helen Miller&_=.png',
                fileName: 'dCED3E47-Eab8-7cEe-f0c8-B8EcA5F8CC32.png'
              },
              {
                id: 'b4d6be7b-3894-9F8e-0F2B-B6e71A729e58',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Susan Lewis&_=.png',
                fileName: '8DEe4465-64E5-222f-Ed2c-fde56cB598Ad.png'
              },
              {
                id: 'BAeF0F9E-1b6F-6b1f-93Ae-DFCBD1D12C25',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Mary Rodriguez&_=.png',
                fileName: 'fdFE85D3-fC0c-3AE3-553E-d0CcCdB3d103.png'
              },
              {
                id: '07fBefa7-aD8f-6f2b-ee31-9cfFF3eAAdC2',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Timothy Martin&_=.png',
                fileName: '1cfb71e4-4fd3-FfaC-9cCB-3E4edeecf08E.png'
              },
              {
                id: 'b58fF531-c5C7-911F-8916-4babdE6dFDE9',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Donald Garcia&_=.png',
                fileName: 'fee4cc0d-81cd-b8c2-a882-734fB6f3f9f7.png'
              },
              {
                id: 'aC82ECAa-A16C-DD7f-6b7A-EFF5BDE8B8D3',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Richard Williams&_=.png',
                fileName: '3133d307-7DF8-6CF3-1Dc4-2c2d4C8373Be.png'
              },
              {
                id: 'e39ACfb9-2f48-E1b8-fBA2-0Edca9c24BBE',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Edward Walker&_=.png',
                fileName: '463E2F2f-DA72-6D8F-0deF-ec3E2fcF8CA5.png'
              },
              {
                id: '6F2f2FCF-bfcD-FC8C-92B2-B54065c864A3',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Deborah Rodriguez&_=.png',
                fileName: 'DeAB5DB9-cB5F-C485-7DeF-658b4158CcB0.png'
              },
              {
                id: 'EA670E8F-04D2-051D-e51e-14dC4AF21Cee',
                url: 'http://dummyimage.com/200x200/ddd/333&text=Deborah Martin&_=.png',
                fileName: 'e0f51CB8-9844-C89a-8ed8-Bbef4B17DeaA.png'
              }
            ]
          },
          message: ''
        }
      }
    }
  }
}
